package simulator.enums;

/* Directions are as seen from lane perspective (standing towards intersection) */
public enum LaneType
{
	SIDEWALK_RIGHTSIDE(0),
	BIKELANE(1),
	BUSLANE(2),
	CAR_RIGHT(3),
	CAR_STRAIGHT(4),
	CAR_LEFT(5),
	VEHICLE_EXIT(6),
	BIKE_EXIT(8), /* warning: outside spec - internal use only */
	SIDEWALK_LEFTSIDE(7);
	
	int _id;
	
	private LaneType(int id)
	{
		_id = id;
	}
	
	public int getID()
	{
		return _id;
	}
	
	public static LaneType fromID(int id)
	{
		for(LaneType l: LaneType.values())
		{
			if(l._id == id) return l;
		}
		
		return null;
	}
}